home *** CD-ROM | disk | FTP | other *** search
/ Borland JBuilder 6 / jbuilder6.iso / Documents / JAVA Programming / examples / 07 / PointCreate.java < prev    next >
Encoding:
Java Source  |  2000-09-08  |  232 b   |  12 lines

  1. class Point { int x, y;
  2. Point(int x, int y) { 
  3. this.x = x;
  4. this.y = y;
  5. } } 
  6.  
  7. class PointCreate {
  8. public static void main(String args[]) { 
  9. Point p = new Point(10,20);
  10. System.out.println("x = " + p.x + " y = " + p.y);
  11. } }
  12.